const requireAll = require('require-all');
const koaCompose = require('koa-compose');

module.exports = function (path) {
    const mid_map = requireAll(path);
    return koaCompose(Object.values(mid_map));
};

